package com.definesys.smecrailtransit.service.Notification;

import android.content.Context;
import android.util.Log;

import com.definesys.smecrailtransit.SmecManager.SmecRetrofit.BaseSubscriber;
import com.definesys.smecrailtransit.SmecManager.SmecRetrofit.HttpResult;
import com.definesys.smecrailtransit.base.SmecBasePresenter;

import java.util.HashMap;

import rx.Observable;

/**
 * Created by xupeizuo on 2017/7/31.
 */

public class NotificationServicePresenter extends SmecBasePresenter implements NotificationServiceContract{

    public NotificationServicePresenter(Context mContext) {
        super(mContext);
    }

    @Override
    public void makeSureJpush(HashMap<String, String> map) {
        Observable<HttpResult> observable=smecRailService.makeSureJpush(map);
        schedulerThread(observable).subscribe(new BaseSubscriber<HttpResult>() {

            @Override
            public void onError(Throwable e) {
               e.printStackTrace();
            }

            @Override
            public void onNext(HttpResult httpResult) {
                Log.e("SSSS",httpResult.getCode()+"*********");
            }
        });
    }
}
